<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <h1 :style='{color:ck ? "red" : "blue",fontSize:ft}'>{{name}}</h1>
        <img v-for='i in ary' :key='i' v-bind:src="i" alt="">
        <input type="checkbox" v-model='ck'>
        <input type="checkbox" v-model='ck2'>
        <input type="checkbox" v-model='ck3'>
        <div :class='"box" + (ck ? " box2" : "")'>{{name}}</div>
        <div class='box' :class='ck ? " box2" : ""'>{{name}}</div>
        <div class='box' :class='{box2:ck,box3:ck2,box4:ck3}'>{{name}}</div>

    </div>
</body>
</html>
<script src="../../node_modules/vue/dist/vue.js"></script>
<script>
    /* 
      v-bind 他是一个专门用来处理行内属性的指令 简写成 :
          行内属性class 当有已经有一个静态的class 和 一个 动态:class时 会自动合并
          vue 专门对 class和 style做了加强
          :class="{类名:控制雷鸣是否添加}"
          :style="{css属性名:css属性值}"
    
     */
    let vm = new Vue({
        el:'#app',
        data:{
            ck:true,
            ck2:true,
            ck3:true,
            ft:"40px",
            name:"珠峰",
            ary:['http://zhufengpeixun.com/main/company/images/photo_jw.jpg',"http://zhufengpeixun.com/main/company/images/photo_zry.jpg"]
        }
    });
</script>